﻿using JoyTalq.Core.Business.Service;
using JoyTalq.Core.Helper;
using log4net.Config;
using Spring.Context;

namespace JoyTalq.Core.Business
{
    public class BusinessFactory
    {
        public BusinessFactory()
        {
            XmlConfigurator.Configure();
        }

        public BusinessFactory(IApplicationContext applicationContext)
        {
            SpringHelper.ApplicationContext = applicationContext;
            XmlConfigurator.Configure();
        }

        public IBusinessService GetBusinessService()
        {
            return SpringHelper.ApplicationContext["BusinessServiceProxy"] as IBusinessService;
        }
    }
}
